<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!doctype html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>LoveTemperature</title>
		<meta name="author" content="ningzero"/>

		<!-- CSS -->
		<link rel="stylesheet" href="../css/salesAnalysis.css">
		<!-- end CSS-->

	</head>

	<body>

		<div id="container">
			<header class="header">
				<div id="login_cart_bar">
					<div id="loginRegisterDiv">
						您好，<s:property value="#session.user.name" />
						<a class="pinkAnchor" href="http://localhost:8080/lovetemperature/sale/logout">退出登录</a>
					</div>
					<div id="cartAccountDiv">
						<a class="pinkAnchor">我的页面</a>
					</div>
				</div>
				<div id="logo_bar">
					<img src="../img/logo.gif"/>
					<img id="logo_text" src="../img/logo2.png"/>
				</div>
				<div id="nav_bar">
					<ul>
						<li class="nav_padding_left"></li>
						<li class="shouye">
							<a href="http://localhost:8080/lovetemperature/manage/memberStat">会员卡情况</a>
						</li>
						<li class="dangao">
							<a href="http://localhost:8080/lovetemperature/manage/salesAnalysis">销售情况</a>
						</li>
						<li class="mianbao">
							<a href="http://localhost:8080/lovetemperature/manage/bestSeller">产品情况</a>
						</li>
						<li class="gandian">
							<a href="http://localhost:8080/lovetemperature/manage/memberStat">会员分析</a>
						</li>
					</ul>
				</div>
			</header>
			<div id="mainContent" class="mainContent">
				<h4>按店面查看销售情况</h4>
				<select>
					<option>请选择店面</option>
					<option>南京市总店</option>
					<option>南京市汉口路分店</option>
					<option>南京市仙林分店</option>
				</select>
				<select>
					<option>请选择店面</option>
					<option>南京市总店</option>
					<option>南京市汉口路分店</option>
					<option>南京市仙林分店</option>
				</select>
				<select>
					<option>请选择店面</option>
					<option>南京市总店</option>
					<option>南京市汉口路分店</option>
					<option>南京市仙林分店</option>
				</select>
				<input type="button" value="显示图表"/>
				<div id="oneShopSalesDiv">
					<div id="oneShopSalesChart" style="min-width: 400px; height: 400px; margin: 0 auto; margin-top: 20px"></div>
				</div>
				<h4>按时间查看销售情况</h4>
				<select>
					<option>请选择时间</option>
					<option>2012年9月份</option>
					<option>2012年10月份</option>
					<option>2012年11月份</option>
					<option>2012年12月份</option>
					<option>2013年1月份</option>
					<option>2013年2月份</option>
				</select>
				<input type="button" value="显示图表"/>
				<div id="oneMonthSalesDiv">
					<div id="oneMonthSalesChart" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
				</div>
			</div>
		</div>
		<!--! end of #container -->
		
		<footer id="footer">
			<img src="../img/tmp/tmpfooter.png" />
		</footer>

		<!-- scripts -->
		<script type="text/javascript" src="../js/libs/jquery-1.9.1.min.js" ></script>
		<script src="../js/libs/highcharts.js"></script>
		<script type="text/javascript" src="../js/index.js" ></script>
		<script>
			$(function(){
				$('#loginDiv').hide();
				$('#registerDiv').hide();
			});
			function initLineChart() {
    		var chart;
    		$(document).ready(function() {
        	chart = new Highcharts.Chart({
            chart: {
                renderTo: 'oneShopSalesChart',
                type: 'line',
                marginRight: 130,
                marginBottom: 25
            },
            title: {
                text: '最近12个月的销售情况一览',
                x: -20 //center
            },
            subtitle: {
                text: '　　　　',
                x: -20
            },
            xAxis: {
                categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
                    'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
            },
            yAxis: {
                title: {
                    text: 'Temperature (°C)'
                },
                plotLines: [{
                    value: 0,
                    width: 1,
                    color: '#808080'
                }]
            },
            tooltip: {
                formatter: function() {
                        return '<b>'+ this.series.name +'</b><br/>'+
                        this.x +': '+ this.y +'°C';
                }
            },
            legend: {
                layout: 'vertical',
                align: 'right',
                verticalAlign: 'top',
                x: -10,
                y: 100,
                borderWidth: 0
            },
            series: [{
                name: 'Tokyo',
                data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
            }, {
                name: 'New York',
                data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
            }, {
                name: 'Berlin',
                data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
            }, {
                name: 'London',
                data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
            }]
        });
    	});
		}
		
		$(function(){
			initLineChart();
		})
		</script>
		<!-- end scripts-->
	</body>
</html>
